package com.navi.loaddata.core.mysqlEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by ghost on 2018/5/14.
 */
public class EtlConfDPK implements Serializable {
    private String projectName;
    private String jobGroupName;
    private String jobName;
    private int jobNo;

    @Column(name = "PROJECT_NAME")
    @Id
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    @Column(name = "JOB_GROUP_NAME")
    @Id
    public String getJobGroupName() {
        return jobGroupName;
    }

    public void setJobGroupName(String jobGroupName) {
        this.jobGroupName = jobGroupName;
    }

    @Column(name = "JOB_NAME")
    @Id
    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    @Column(name = "JOB_NO")
    @Id
    public int getJobNo() {
        return jobNo;
    }

    public void setJobNo(int jobNo) {
        this.jobNo = jobNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlConfDPK that = (EtlConfDPK) o;

        if (jobNo != that.jobNo) return false;
        if (projectName != null ? !projectName.equals(that.projectName) : that.projectName != null) return false;
        if (jobGroupName != null ? !jobGroupName.equals(that.jobGroupName) : that.jobGroupName != null) return false;
        if (jobName != null ? !jobName.equals(that.jobName) : that.jobName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = projectName != null ? projectName.hashCode() : 0;
        result = 31 * result + (jobGroupName != null ? jobGroupName.hashCode() : 0);
        result = 31 * result + (jobName != null ? jobName.hashCode() : 0);
        result = 31 * result + jobNo;
        return result;
    }
}
